
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>个人资料</title>
  <link rel="stylesheet" href="__PUBLIC__/mobile/css/public.css">
  <link rel="stylesheet" href="__PUBLIC__/mobile/css/user.css">

  <link href="__PUBLIC__/css/layui.css" rel="stylesheet" type="text/css" media="all"/>
  <script type="text/javascript" src="__PUBLIC__/layui.js"></script>

  <script src="__PUBLIC__/mobile/js/jquery-1.8.3.min.js" type="text/javascript"></script>
<style>
  .hint-input-span-container {
  width:100%;
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  display: inline-block;
  padding: 2px 4px;
  color: #555;
  vertical-align: middle;
  border-radius: 1px;
  max-width: 100%;
  line-height: 30px;
  }
  .hint-input-span-container .tag {
  padding: -2px;
  font-size: 12px;
  font-family: serif;;
  margin-right: 2px;
  margin-top: 2px;
  margin-bottom: 2px;
  display: inline-block;
  }
  .label {
  font-size: 10px;
  padding: 4px 6px;
  border: none;
  text-shadow: none;
  border-radius: 3px;
  font-weight: 200;
  }
  .label-primary {
  background: #2693FF;
  color: white;
  }
  .hint-input-span-container span i[data-role='remove'] {
  cursor: pointer;
  }
  .tag {
  margin-right: 2px;
  color: white;
  }
  .tag [data-role="remove"] {
  margin-left: 2px;
  cursor: pointer;
  }
  input[name='select_grade'] {
  border: none;
  box-shadow: none;
  outline: none;
  background-color: transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: inherit;
  }
  .hint-block {
  position: absolute;
  width: 100px;
  max-height: 120px;
  background-color: #fff;
  overflow: auto;
  display: none;
  z-index: 9999;
  }
  .hint-ul {
  text-decoration: none;
  list-style-type: none;
  padding-left: 5px;
  }
  .hint-ul li{
  font-size: 14px;
  padding: 2px 4px;
  }
  .hint-ul li:hover{
  background-color: #eee;
  }
</style>
</head>
<body>
  <header>
      <div class="tab_nav">
        <div class="header">
          <div class="h-left"><a class="sb-back" href="{:U('mobile/info/ls_home',array('newcity'=>$city))}" title="返回"></a></div>
          <div class="h-mid">证件上传</div>
        </div>
      </div>
      </header>

    <div id="tbh5v0">
    <div class="Personal">
    <div id="tbh5v0">
      <div class="innercontent1">
        <!-- <form class="layui-form" method="post">身份证信息：
          <div class="name"><span style="width: 20%;">姓名：</span>
            <input type="text" required  lay-verify="required" name="sfz_name" placeholder="请输入您的姓名" value="{$laoshi_sfz.sfz_name}" class="c-f-text">
            <button lay-submit lay-filter="sfz_name" style="width: 60px;height:30px;position: absolute; top:90px;right: 10px;">修改</button>
          </div>
        </form> -->

        <!-- <form class="layui-form" method="post">
          <div class="name"><span style="width: 20%;">号码：</span>
            <input type="text" required  lay-verify="required" name="sfz" placeholder="请输入您的身份证号" value="{$laoshi_sfz.sfz_num}" class="c-f-text">
            <button lay-submit lay-filter="sfz_num" style="width: 60px;height:30px;position: absolute; top:140px;right: 10px;">修改</button>
          </div>
        </form> -->

        <form action="{:U('mobile/info/sfz_img',array('newcity'=>$city))}" method="post" enctype="multipart/form-data">身份证：
          <div class="name"><!-- <span style="width: 20%;">照片：</span> -->
            <input name="file" type="file" style="opacity: 0.6;height: 28px;width: 75px;">
            <?php if (empty($laoshi_sfz['sfz_img'])) { ?>
              <button lay-submit lay-filter="*" style="width: 60px;height:30px;position: absolute; top:85px;right: 10px;">上传</button>
            <?php }else { ?>
              <button lay-submit lay-filter="*" style="width: 60px;height:30px;position: absolute; top:85px;right: 10px;">修改</button>
            <?php } ?>
          </div>
        </form>
        
        <form action="{:U('mobile/info/jiaoshizheng_img',array('newcity'=>$city))}" method="post" enctype="multipart/form-data"><br>教师资格证：
          <div class="name"><!-- <span style="width: 20%;">照片：</span> -->
            <input name="file" type="file" style="opacity: 0.6;height: 28px;width: 75px;">
            <?php if (empty($laoshi_sfz['jiaoshizheng_img'])) { ?>
              <button lay-submit lay-filter="*" style="width: 60px;height:30px;position: absolute; top:170px;right: 10px;">上传</button>
            <?php }else { ?>
              <button lay-submit lay-filter="*" style="width: 60px;height:30px;position: absolute; top:170px;right: 10px;">修改</button>
            <?php } ?>
          </div>
        </form>

        <form action="{:U('mobile/info/qitazheng_img',array('newcity'=>$city))}" method="post" enctype="multipart/form-data"><br>学位证/其它证件：
          <div class="name"><!-- <span style="width: 20%;">照片：</span> -->
            <input name="file" type="file" style="opacity: 0.6;height: 28px;width: 75px;">
            <?php if (empty($laoshi_sfz['qitazheng_img'])) { ?>
              <button lay-submit lay-filter="*" style="width: 60px;height:30px;position: absolute; top:256px;right: 10px;">上传</button>
            <?php }else { ?>
              <button lay-submit lay-filter="*" style="width: 60px;height:30px;position: absolute; top:256px;right: 10px;">修改</button>
            <?php } ?>
          </div>
        </form>  

        <p style="font-size: 12px;color: #F97110;">郑重承诺：您上传的证件仅供平台审核使用，不会泄漏给任何机构和个人。</p>
          
      </div>
      
    </div>
  </div>          
</div>
<script type="text/javascript">
    layui.use(['form','layer'], function(){
      var layer = layui.layer
      ,form = layui.form();
      //layer.msg('Hello World');
  
      //姓名
    form.on('submit(sfz_name)', function(data){
        $.ajax({
            url: "{:U('mobile/info/sfz_name')}",//请求地址
            type: "post",//请求方式
            dataType: "json",//返回数据类型
            data: data.field,//发送的参数
            })
            .done(function(response) {
                  if(response.error==0){
                     layer.msg(response.info ,{icon:5});

                  }else{
                     layer.msg(response.info ,{icon:6});
                     location.reload();

                  }
              })
            .fail(function() {
                alert("ajxs交互失败");
            })  

          return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });   

      //号码
    form.on('submit(sfz_num)', function(data){
        $.ajax({
            url: "{:U('mobile/info/sfz_num')}",//请求地址
            type: "post",//请求方式
            dataType: "json",//返回数据类型
            data: data.field,//发送的参数
            })
            .done(function(response) {
                  if(response.error==0){
                     layer.msg(response.info ,{icon:5});

                  }else{
                     layer.msg(response.info ,{icon:6});
                     location.reload();

                  }
              })
            .fail(function() {
                alert("ajxs交互失败");
            })  

          return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        }); 
    });
</script>

</body>
</html>